<?php get_header();?>
<?php if ($posts) { ?>
<?php $post = $posts[0]; /* Hack. Set $post so that the_date() works. */ ?>
<?php require('sidebar2.php');?>
<?php get_sidebar(); ?>
<section class="content">
  <?php if (is_day()) { ?>
  <h3>
    <?php the_time('l, F jS, Y'); ?>
  </h3>
  <div class="post-info">Daily Archive</div>
  <?php } elseif (is_month()) { ?>
  <h3>
    <?php the_time('F Y'); ?>
  </h3>
  <div class="post-info">Monthly Archive</div>
  <?php } elseif (is_year()) { ?>
  <h3>
    <?php the_time('Y'); ?>
  </h3>
  <div class="post-info">Yearly Archive</div>
  <?php } ?>
  <br/>
  <?php foreach ($posts as $post) : start_wp(); ?>
  <?php require('post.php'); ?>
  <?php endforeach; ?>
  <p align="center">
    <?php posts_nav_link() ?>
  </p>
  <?php } else { ?>
  <p>
    <?php _e('Sorry, no posts matched your criteria.'); ?>
  </p>
  <?php } ?>
</section>
<?php get_footer();?>
